home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / man / man-part1 / cat2 / xclip.2 < prev    next >
Text File  |  1999-09-16  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4. xclip(2)                       Scilab Function                       xclip(2)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. NAME
  12.   xclip - set a clip zone
  13.  
  14. CALLING SEQUENCE
  15.   xclip([x,y,w,h])
  16.   xclip(rect)
  17.   xclip("clipgrf");
  18.  
  19. PARAMETERS
  20.  
  21.   x,y,w,h   : four float values
  22.  
  23.   rect      : a vector of size (1,4)
  24.  
  25. DESCRIPTION
  26.   Sets a clip region given by the coordinates, in the current graphic scal-
  27.   ing, of a rectangle (x,y,w,h) (Upper-Left point,Width aba Height). If only
  28.   one argument is used it stands for a rectangle specification
  29.   rect=[x,y,w,h].
  30.  
  31.   xclip("clipgrf") is used to clip the usual graphic rectangle.
  32.  
  33.   To unclip a region use the command xclip()
  34.  
  35. EXAMPLE
  36.   x=0:0.2:2*%pi;
  37.   x1=[sin(x);100*sin(x)];
  38.   y1=[cos(x);100*cos(x)];
  39.   y1=y1+20*ones(y1);
  40.   // No clip
  41.   plot2d([-100,500],[-100,600],[-1,-1],"022");
  42.   xsegs(10*x1+200*ones(x1),10*y1+200*ones(y1));
  43.   xbasc()
  44.   //
  45.   // Rect clip
  46.   xbasc();plot2d([-100,500],[-100,600],[-1,-1],"022");
  47.   xrect(150,460,100,150);
  48.   xclip(150,460,100,150);
  49.   xsegs(10*x1+200*ones(x1),10*y1+200*ones(y1));
  50.   //
  51.   // usual graphic rectangle clip
  52.   xbasc();plot2d([-100,500],[-100,600],[-1,-1],"022");
  53.   xclip("clipgrf");
  54.   xsegs(10*x1+200*ones(x1),10*y1+200*ones(y1));
  55.   // clipping off
  56.   xclip()
  57.  
  58.  
  59.  
  60.  
  61. AUTHOR
  62.   J.Ph.C.
  63.  
  64.  
  65.  
  66.  
  67.